/*****************************************************************************************
# File Name:    main.cpp
# Author:       rosetmac
# Mail:         604991988@qq.com
# Created Time: Sat 08 Mar 2025 10:29:40 AM CST
**************************************************************************************/
#include <iostream>
#include <cstring>
using namespace std;

#include "UserManager.h"


int main(int argc, char *argv[]) {
    UserManager userManager;

    // 注册用户
/*
    if (userManager.registerUser("admin", "123456")) {
        std::cout << "Alice registered successfully!" << std::endl;
    }

    // 登录用户
    if (userManager.loginUser("admin", "123456")) {
        std::cout << "Alice logged in successfully!" << std::endl;
    }*/

    // 获取用户信息
    User* user = userManager.getUser(3);  // 假设 Alice 的 ID 是 1
    if (user) {
        std::cout << "User ID: " << user->getId() << ", Username: " << user->getUsername() << std::endl;
    }

    // 登出用户
    userManager.logoutUser(3);
    return 0;
}
